package com.youlu.campus.admin.auth.shiro.config;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * Created by tommy
 *
 * @author zhuhuaiqi
 */
@ConfigurationProperties(prefix = AuthProperties.AUTH_PREFIX)
public class AuthProperties {

    public static final String AUTH_PREFIX = "auth";


    /** AssessToken过期时间，默认1天 */
    private Integer assessTokenExpiresIn = 24 * 60 * 60 * 1000;

    /** 匿名访问 */
    private String anonPaths;

     /** 域名 */
    private String cookieDomain = ".weimtek.cn";

    /** 默认-1 表示关闭浏览器时过期 Cookie */
    private Integer cookieMaxAge = -1;

    /** cookie path */
    private String cookiePath = "/";

    /** 是否登录接口 */
    private Boolean login;

    /** 需要权限检查,但不更新RedisTTL */
    private String noTtlPaths;

    public Integer getAssessTokenExpiresIn() {
        return assessTokenExpiresIn;
    }

    public void setAssessTokenExpiresIn(Integer assessTokenExpiresIn) {
        this.assessTokenExpiresIn = assessTokenExpiresIn;
    }

    public String getAnonPaths() {
        return anonPaths;
    }

    public void setAnonPaths(String anonPaths) {
        this.anonPaths = anonPaths;
    }

    public String getCookieDomain() {
        return cookieDomain;
    }

    public void setCookieDomain(String cookieDomain) {
        this.cookieDomain = cookieDomain;
    }

    public Integer getCookieMaxAge() {
        return cookieMaxAge;
    }

    public void setCookieMaxAge(Integer cookieMaxAge) {
        this.cookieMaxAge = cookieMaxAge;
    }

    public String getCookiePath() {
        return cookiePath;
    }

    public void setCookiePath(String cookiePath) {
        this.cookiePath = cookiePath;
    }

    public Boolean getLogin() {
        return login;
    }

    public void setLogin(Boolean login) {
        this.login = login;
    }

    public String getNoTtlPaths() {
        return noTtlPaths;
    }

    public void setNoTtlPaths(String noTtlPaths) {
        this.noTtlPaths = noTtlPaths;
    }
}
